<!--{include(pe_tpl('header.html'));}-->
<div class="content">
	<form method="post" id="form" target="_blank">
	<div class="order_cg">
		<i class="tjcg_dui"></i>
		<!--{if($info['order_state'] == 'wpay' && $info['order_payment'] != 'cod'):}-->
		<div class="tjcg_tt">订单提交成功，请尽快付款！</div>
		<!--{elseif($info['order_state'] == 'success' or $info['order_payment'] == 'cod'):}-->
		<div class="tjcg_tt">订单提交成功，我们会尽快安排发货！</div>
		<!--{endif;}-->
		<!--<div class="mat8 c888">（请您在48小时内完成支付，否则订单会被自动取消）</div>-->
		<div class="mat20">交易编号：<span class="c888 mal5">{$info['pay_id']}</span></div>
		<div class="mat10" style="margin-right:260px">订单信息：<span class="c888 mal5">{$info['order_name']}</span></div>
		<div class="dd_yingfu">应付金额：<span>{$info['order_money']}</span> 元</div>
	</div>
	<!--{if($info['order_state'] == 'wpay' && $info['order_payment'] != 'cod'):}-->
	<div class="dd_box" style="padding-bottom:40px;">
		<div class="liucheng">选择支付方式</div>
		<ul class="fkfs">
			<!--{foreach($info['payment_list'] as $k=>$v):}-->
			<li class="js_radio">
				<label for="order_payment_{$v['payment_type']}">
					<input type="radio" name="order_payment" value="{$v['payment_type']}" id="order_payment_{$v['payment_type']}" style="display:none" />
					<!--{if($v['payment_type'] == 'balance'):}-->
					<img src="{$v['payment_logo']}" />
					<div>钱包余额<p class="corg font12 normal">{$user['user_money']}元</p></div>
					<!--{else:}-->
					<img src="{$v['payment_logo']}" /><span>{$v['payment_name']}</span>					
					<!--{endif;}-->
					<i></i>
				</label>
			</li>
			<!--{endforeach;}-->
		</ul>
		<div class="clear"></div>
		<div class="zf_box" id="paypw_html">
			<div class="zf_text">请输入支付密码：</div>
			<div class="zfmm">
				<input type="password" name="user_paypw" value="" />
				<a href="{$pe['host']}user.php?mod=setting&act=paypw" target="_blank" class="cblue mal10">重置密码</a>
			</div>
		</div>
		<input type="hidden" name="pe_token" value="{$pe_token}" />
		<input type="hidden" name="pesubmit" />
		<input type="button" value="确认支付" onclick="pay_btn()" class="ddtj_btn" style="float:none; margin:30px 0 50px 45px;" />
		<!--{endif;}-->
	</div>
	</form>
</div>
<script type="text/javascript">
$(function(){
	pe_select_radio('order_payment', "{$info['order_payment']}", function(){
		if ($(":input[name='order_payment']:checked").val() == 'balance' && {$info['order_money']} > 0) {
			$("#paypw_html").show();		
		}
		else {
			$("#paypw_html").hide();		
		}
	});
})
//支付提交按钮
function pay_btn() {
	var order_payment = $(":input[name='order_payment']:checked").val();
	if (order_payment == 'bank') {
		layer.open({
			type: 2,
			title: '转账汇款说明',
			area: ['550px', '350px'],
			fixed: false, //不固定
			shadeClose: true,
			shade: 0.5,
			content: "{$pe['host']}include/plugin/payment/bank/pay.php"
		});
		return false;	
	}
	$.ajaxSettings.async = false;
	pe_submit("{pe_nowurl()}", function(json){
		//$(":input[name='user_paypw']").val('');
		if (json.code == 1) {
			pe_open(json.data.url, 1000);	
		}
	})
}
//支付密码确认按钮
function paypw_btn() {
	var user_paypw = $('#paypw').val();
	if (user_paypw == '') {
		pe_tip('请输入支付密码');
		return false;
	}
	$(":input[name='user_paypw']").val(user_paypw)
	//layer.closeAll();
	pay_btn();
}
</script>
<!--{include(pe_tpl('footer.html'));}-->